<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<meta name="format-detection" content="telephone=no" />
		<meta name="format-detection" content="email=no" />
		<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width;" />
		<title>清除缓存</title>

		<link rel="stylesheet" type="text/css" href="../css/tool/comm.css" />

		<script type="text/javascript" src="../plugins/zepto.js"></script>
  		<script type="text/javascript" src="../js/tool/common.js"></script>
		

	</head>
	<body style="background: #eee;">

		<video src="http://media.hzlingdian.com/mp4/1.mp4 "></video>
		<div class="div_noSelect btn"></div>
		<div class="div_noSelect btn"></div>
		<div class="div_noSelect btn"></div>
		<div onclick="answer(1)">答案1</div>
		<div onclick="answer(2)">答案2</div>
		<div onclick="answer(3)">答案3</div>
		<div onclick="answer(4)">答案4</div>
		<div onclick="claer();">x</div>


		<textarea id="test"></textarea>
	</body>
	<script type="text/javascript">

		var div_selected=null;
		var answerStr="";
		 $('body,btn').on('click','.div_noSelect',function(){
		 	$('body').find(".div_selected").removeClass("div_selected").addClass('div_noSelect');
		 	$(this).removeClass('div_noSelect').addClass("div_selected");

		 	div_selected = $(this);
		 	answerStr = "";
		 });

		function answer(str){
			if(!div_selected){
				alert("请选择答题位置");
				return;
			}
			answerStr += str;
			div_selected.html(answerStr);
		}

		function claer() {
			div_selected.html("");
		}
	</script>
</html>

